//
//  ShareSDKManager.m
//  QYBaseProject
//
//  Created by Dxc_iOS on 2018/7/20.
//  Copyright © 2018年 代星创. All rights reserved.
//

#import "ShareSDKManager.h"
#import "Configuration.h"
@implementation ShareSDKManager
/**
 shareSDK分享
 shareSDK官网集成文档：http://wiki.mob.com/cocoapods%E9%9B%86%E6%88%90/
 */
+(void)shareSDKContentWithImageArrary:(NSString *)arrary title:(NSString *)title content:(NSString *)content URL:(NSString *)url type:(NSInteger)type withSuccess:(SuccessBlock)Success
{
    NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
    [shareParams SSDKSetupShareParamsByText:content images:arrary url:[NSURL URLWithString:url]  title:title type:SSDKContentTypeAuto];
    switch (type) {
            
        case 0:  //微信
        {
            [ShareSDK share:SSDKPlatformSubTypeWechatSession parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
                
            }];
            
            break;
        }
        case 1: //朋友圈
        {
            [ShareSDK share:SSDKPlatformSubTypeWechatTimeline parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
                
            }];
            break;
        }
        case 2: //微博
        {
            [ShareSDK share:SSDKPlatformTypeSinaWeibo parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
                
            }];
            break;
        }
        case 3: //QQ
        {
            [ShareSDK share:SSDKPlatformTypeQQ parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
                
            }];
            break;
        }
        case 4:  //QQ空间
        {
            [ShareSDK share:SSDKPlatformSubTypeQZone parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
                
            }];
            break;
        }
        default:
            break;
    }
    
    
    
    
}

@end
